<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>银行资料备案</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="${ctx}/css/ui.datepicker.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
	<script src="${ctx}/js/table.js" type="text/javascript" language="javascript"></script>
	<script src="${ctx}/js/jquery-1.5.2.js" type="text/javascript" charset="utf-8"></script>
	<script src="${ctx}/js/ui.datepicker.js" type="text/javascript" charset="utf-8"></script>	
	<script src="${ctx}/js/ui.datepicker-zh-CN.js" type="text/javascript" charset="utf-8"></script>	
	<script src="${ctx}/js/help.js" type="text/javascript" ></script>
	<script type="text/javascript" charset="utf-8">
	jQuery(function($){
		$('#b_openTime').datepicker({
				yearRange: '1900:2099', //取值范围.
				showOn: 'both', //输入框和图片按钮都可以使用日历控件。
				buttonImage: '${pageContext.request.contextPath}/images/calendar.gif', //日历控件的按钮
				buttonImageOnly: true,
				showButtonPanel: true
			});		
		});
	</script>	
<style type="text/css">
body{
	background-color:#F2FDDB;
}
#button {
	position:absolute;
	width:1100px;
	height:21px;
	z-index:1;
	left: 0px;
	top: 0px;
	background-color: #333333;
}
a{
text-decoration:none;
}
a:link,a:visited,a:hover{
text-decoration:none;
color:#333333;
}
#Layer1 {
	position:absolute;
	width:1070px;
	height:116px;
	z-index:2;
	left: 0px;
	top: 176px;
}
#content {	position:absolute;
	width:1070px;
	height:172px;
	z-index:2;
	left: 0px;
	top: 0px;
}
.style{
background-color:#CCCCFF;
border:1px solid #BFD1EB;
}
.STYLE1 {color: #FF0000}
#tishi {
	position:absolute;
	width:185px;
	height:40px;
	z-index:3;
	left: 9px;
	top: 36px;
}
#div1{
position:absolute;
background:#FFFFCC;
left:880px;
top:55px;
overflow:hidden;
width:180px;
display:none;
z-index:5;
}
.c {width:20px;height:20px;}
.c ul {margin:0px;padding:0px;}
.c ul li{width:16px;height:17px;float:left; 
background-image:url('${ctx}/images/help.jpg');
list-style-type:none}
</style>
<script type="text/javascript" charset="utf-8">
function validate(){
	if(document.getElementById("b_id").value==""){
		alert("纳税人识别码不能为空");
		return false;
	}
	if(document.getElementById("b_username").value==""){
		alert("纳税人姓名不能为空");
		return false;
	}
	if(document.getElementById("b_bankname").value==""){
		alert("开户银行还没选择");
		return false;
	}
	if(document.getElementById("b_banknumber").value==""){
		alert("银行帐号还没输入");
		return false;
	}
	if(document.getElementById("b_banknumber").value.length!=19){
	    alert("银行帐号为19位数字");
	    return false;
	}
	if(document.getElementById("b_openTime").value==""){
		alert("开户时间还没输入");
		return false;
	}
	if(document.getElementById("b_banlipeople").value==""){
		alert("办理开户人员的姓名还没输入");
		return false;
	}
	if(document.getElementById("b_callnumber").value==""){
		alert("请输入有效联系方式");
		return false;
	}
	if(document.getElementById("b_bankadd").value==""){
		alert("银行地址为空，请输入");
		return false;
	}
	return true;
}
function checkByNumber(){
	if(document.getElementById("b_id").value==""){
		alert("纳税人识别码不能为空");
		return false;
	}
	if(document.getElementById("b_id").value.length!=18){
	    alert("纳税人识别码为18位数字");
	    return false;
	}
    $.ajax({   
        url:"${ctx}/taxmanage/tmBankInfo_check.action",   
        type:"post",   
        data:{"pcode":$("#b_id").val()},   
        dataType:"json",   
        success:function(data){
           var k=typeof(data);
		   if(k=="object"){
			   if(data.tmPersonInfo.taxplayer != null){
			   		$('#b_username').val(data.tmPersonInfo.taxplayer);
			   }
            }
		   if(k=="string"){
				alert(data);
			}
        }
        	
     });   
   return false;
}
</script>
</head>
  
  <body>
  <div id="Layer1">
  <table width="100%" border="0" cellspacing="0">
  <tr>
    <td colspan="5">
	
    <table width="1070" height="30" border="1" cellspacing="0" bordercolor="#666666" class="style" frame="above" rules="none">
      <tr style="background-color:#CCCCFF; font-size:13px;color:#849BCA" align="center">
        <td width="174" height="30">纳税人识别码</td>
        <td width="205">纳税人(名称)姓名</td>
        <td width="116">开户行</td>
        <td width="158">银行帐户帐号</td>
        <td width="102">开户时间</td>
        <td width="175">银行地址</td>
        <td width="110">银行联系方式</td>
      </tr>
	  </table>
	</td>
    </tr>
  <tr>
    <td height="205" colspan="5" valign="top">
	<table width="1069" border="1" cellspacing="0" bordercolor="#FFCCFF" style="border-collapse: collapse"  id="tbColor"  frame="hsides" rules="cols">
	 <c:forEach items="${pageView.records}" var="entity">
        <tr style="font-size:12px" align="center">
          <td width="173" align="center">${entity.pcode}</td>
          <td width="205" align="left">${entity.taxplayer}</td>
          <td width="117" align="center">${entity.bank}</td>
          <td width="158" align="center">${entity.account}</td>
          <td width="102" align="center">${entity.startdate}</td>
          <td width="176" align="left">${entity.bankaddress}</td>
          <td width="108" align="center">${entity.phone}</td>
        </tr>
      </c:forEach>
	</table>
	</td>
    </tr>
	<%@ include file="/pages/taxmanage/fenye.jsp"%>
</table>
  </div>
  <div id="content">
  <table width="1070" border="0" cellspacing="0">
  <tr>
    <td>
	<form id="form1" name="form1" action="${ctx}/taxmanage/tmBankInfo_execute.action" method="post" onsubmit="return validate();">
	<fieldset>
	<legend>纳税人(企业或个人)银行资料信息备案</legend>
      <div id="tishi">
        <table width="100%" height="68" border="0">
          <tr>
            <td height="40" style="font-size:12px"><span class="STYLE1">温馨提示：</span><br>
              若是企业纳税人基本信息登记，纳税人识别码是所在地区代码+企业编号；<br>
              若为个体户信息登记，则识别码为该身份证号</td>
          </tr>
        </table>
      </div>
      <table width="800" height="146" border="0" align="center" cellspacing="0" style="font-size:13px;">
        <tr>
          <td width="162" height="28" align="right">纳税人识别码：</td>
          <td width="191"><input  style="width:140px"type="text" name="entity.pcode" id="b_id" onblur="checkByNumber()"></td>
          <td width="180" align="right">纳税人(名称)姓名：</td>
          <td width="208"><input  style="width:180px; color:#999999"type="text" readonly name="entity.taxplayer" id="b_username"></td>
          <td width="49"><div class="c">
          <ul>
            <li onMouseOver="f_s('div1')" onMouseOut="closeW('div1')"></li>
          </ul>
        </div>帮助</td>
        </tr>
        <tr>
          <td height="26" align="right">开户行：</td>
          <td><select name="entity.bank" id="b_bankname">
            <option disabled="disabled" selected="selected">--请选择--</option>
            <option value="中国人民银行">中国人民银行</option>
            <option value="中国农业银行">中国农业银行</option>
            <option value="中国建设银行">中国建设银行</option>
            <option value="中国工商银行">中国工商银行</option>
          </select></td>
          <td align="right">银行帐户帐号：</td>
          <td colspan="2"><input  style="width:130px;"type="text" name="entity.account" id="b_banknumber"></td>
          </tr>
        <tr>
          <td height="24" align="right">开户时间：</td>
          <td><input style="width:80px;" type="text" readonly name="entity.startdate" id="b_openTime" class="datepicker"></td>
          <td align="right">办理人员：</td>
          <td colspan="2"><input  style=" width:80px;"type="text" name="entity.manager" id="b_banlipeople"></td>
          </tr>
        <tr>
          <td height="28" align="right">银行联系方式(固定)：</td>
          <td><input style=" width:100px;" type="text" name="entity.phone" id="b_callnumber" onChange="isTel(b_callnumber)"></td>
          <td align="right">银行地址：</td>
          <td colspan="2"><input  style="width:190px;"type="text" name="entity.bankaddress" id="b_bankadd"></td>
          </tr>
        <tr>
          <td height="28" align="right">&nbsp;</td>
          <td align="right"><input style="width:70px; height:25px;"type="submit" name="Submit22" value="提 交"></td>
          <td><input  style="width:70px; height:25px;"type="reset" name="Submit2" value="重 置"></td>
          <td colspan="2">&nbsp;</td>
          </tr>
    </table>
	  </fieldset>
    </form>
	</td>
  </tr>
</table>
  </div>
  <div id="div1" onMouseOver="showDiv()" onMouseOut="closeW('div1')">
<fieldset>
<fieldset>
<table width=100%  height="240" border="1" cellspacing="0" frame="void" rules="rows">
  <tr>
    <td align="left" style="font-size:13px;" height="25">帮助提示：</td>
  </tr>
  <tr>
    <td align="left" style="font-size:12px" valign="top">1.纳税人名称为企业名称或个人姓名;
	<br>2.银行帐号由19位数字组成，第一个数字不能为0;<br>3.办理人员为企业或者个人开户时银行的工作人员<br>4.银行联系方式为固定电话,固定电话格式为区号+座机号码;
	</td>
  </tr>
</table>
</fieldset>
</fieldset>
</div>
  </body>
</html>
